﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using LinQ_DTO;

namespace BUS
{
    public class ChiTietHoaDonBUS
    {
        public List<shop_chitiethoadon> LayDanhSachChiTietHoaDon()
        {
            ChiTietHoaDonDAO cthdDAO = new ChiTietHoaDonDAO();
            return cthdDAO.LayDanhSachChiTietHoaDon();
        }

        public shop_chitiethoadon LayChiTietHoaDonsTheoMa(int MaChiTietHoaDon)
        {
            ChiTietHoaDonDAO cthdDAO = new ChiTietHoaDonDAO();
            return cthdDAO.LayChiTietHoaDonsTheoMa(MaChiTietHoaDon);
        }

        public void XoaChiTietHoaDon(int MaChiTietHoaDon)
        {
            ChiTietHoaDonDAO cthdDAO = new ChiTietHoaDonDAO();
            cthdDAO.XoaChiTietHoaDon(MaChiTietHoaDon);
        }

        public void CapNhatChiTietHoaDon(shop_chitiethoadon cthdLinq)
        {
            ChiTietHoaDonDAO cthdDAO = new ChiTietHoaDonDAO();
            cthdDAO.CapNhatChiTietHoaDon(cthdLinq);
        }

        public void ThemChiTietHoaDon(shop_chitiethoadon cthdLinq)
        {
            ChiTietHoaDonDAO cthdDAO = new ChiTietHoaDonDAO();
            cthdDAO.ThemChiTietHoaDon(cthdLinq);
        }

        /************************************************************************************************************        *
         * coder: TRAN KINH LY 
         ***********************************************************************************************************/
        public List<shop_chitiethoadon> LayDanhSachTheoMaHoaDon(int id_hoadon)
        {
            ChiTietHoaDonDAO cthdDAO = new ChiTietHoaDonDAO();
            return cthdDAO.LayDanhSachTheoMaHoaDon(id_hoadon);
        }

        /************************************************************************************************************        *
         * coder: TRAN KINH LY 
         ***********************************************************************************************************/

    }
}
